<?php
/**
 * Created by PhpStorm.
 * User: ari
 * Date: 11/19/14
 * Time: 11:18 AM
 */
namespace BC\User;

use BC\Config;
use CPath\Render\HTML\Header\HeaderConfig;
use CPath\Render\HTML\Header\IHeaderWriter;
use CPath\Render\HTML\Header\IHTMLSupportHeaders;
use CPath\Request\IRequest;

class UserConfig implements IHTMLSupportHeaders
{
	static $UserContentPath = 'user/';
	static $UserSessionKeyRingPath;

	static function writeUserSupportHeaders(IRequest $Request, IHeaderWriter $Head) {
		$Config = new UserConfig;
		$Config->writeHeaders($Request, $Head);
	}

	/**
	 * Write all support headers used by this renderer
	 * @param IRequest $Request
	 * @param IHeaderWriter $Head the writer inst to use
	 * @return void
	 */
	function writeHeaders(IRequest $Request, IHeaderWriter $Head) {
		HeaderConfig::writeJQueryHeaders($Head);
		$Head->writeScript(__DIR__ . '/assets/user.js');
	}

	static function getContentPath($additionalPath = null) {
		return Config::getContentPath(static::$UserContentPath, $additionalPath);
	}
}